Progress bar and bug fixes