Issue 4, attachment update bug in sync()