Fixed a bug that caused the editor ro crash on start up.