Fix editor resizing bug