- fixed a bug with rewriting data