Made few changes for set progress to update the progressbar