Fixed lockFrame Method when pausing

Fixed it so it works propperly when pausing a recording. The frame will stay locked when the recording is paused, and only be unlocked if the user presses stop or recording fails