Error redirection fix