tidied up some ugly shiz
some fixes to make things work if the editor is closed during recording