Added header() with 500 response code