fix segv bug in --progress handling