additions to inject_error