fixed a bug in download progress check