fix bug in compress script