Better finish loading detection for improving progress bar.