fixed bug in mutex_lock