Fixed bug in compression that would cause a nil pointer dereference