Fixed progressfnc bug