improve how to handle 404