fixed firebase syncing bugs