Fix NPE on closing editor and simplified hover handling.