@record editing code was outof sync with main loop