minor improvements for compression