corrected a synchronisation bug