Fixed some minor issues with 404 error handling.