fixes #2286 fixed leaking vars handlerType and headingText