Fixed an error with writing output for GET requests