fix uncompressed writing