synch engine bug fixes

additionally various bug fixes by petri