Fix NPE in region editor tool