Fixed major leak in tejppackagehandler, minor leak still remains somewhere