fix error state when the function to inject does not exist