bugfixes
now with progress bar.