Progress bar, fixed bugs