Bug Fix: do not run critical section if lock timesout