Added an else clause to make the editor work 100% when checking for empty areas.