added redirect on exception