fixing dealock in lock manager