Added 404 error handling