changed 500 to 404