Bug fix, recursice calls to mutex lock.