eliminated max_count variable by counting down
progress with only one counter (no max_counter) seems to work now\!