Fixed recently generated bug in worker.cpp. Thread mutex: locking without unlocking.