Fix initial value of progress dialog after rotating screen.

Also fix some comments.