fixed bug in compression step
another bugg