Fixes to 404 error handling