Fix error redirection