fixed a crash when removing a keyword