more error checking in injector