fixed an editor crash (thanks to YellowAfterlife <3 )