Fixed bug where compression format was not being written out correctly