misc event handling cleanup