fixed bug where a random frame was being added to the recording.