Fix bug in show_progress()

Bug described by Peter Stuifzand in https://gist.github.com/pstuifzand/5386527