fixes leveleditor crash