Fixed issue in sync_devices