Solved issue with progress variable