Fix sync

Sync method was operating on a copy of self, rather than supplied data. i'm not sure yet of the ins and outs of this, but this change passes the test