removed superfluous commands in the critical section