Fixes some bugs, adds progressbar dialog