Checking return statements to fix multiple http responses to single request.