Fix reference to the editor and repaint scene