minor bug fixes to fix memory problems in EsperEngine class