Fix exception thrown in 404 page