Remove the problematic locking code