fixes 0-byte response bug per @afeld