Fixed layout throwing exception under 404 error.