Missing assignment in addAndLock