fixing many bugs that have to do with null pointers when performing
syncadapter onSync