Implemented goals locking logic partially