added a lock that should have been there