fixed bug where objectEnvs and methodEnvs didnot init