Fix error

thrown when toggle highlight after closing editor