Added missing lock() call.