fixing compression bug