fixes to pahse 2 compression