fix compress bug.. improve code