More compression writing fixes