Minor bug in error_inject method-1