Fix locking around stop condition