Fixed an issue with the wrong check for editor object