Simplify responseText fix and handle empty response bodies correctly