emergency fix

fixed logic for instances where 'lastSync' doesn't exist for a device