Deal with 500 error case