fix var initialization, and adding test exception on method injector