fix bug in device synchronisation