fixed not adding to database due to closeing the response to soon