Fixed bug in recorder