Get rid of unnecessary handlers.