fixed uncaught error locking up editor bug