fix compress region, some cleanup
fix merge with upstream