Fix running in the editor