fixed the loop for being a possible cause for the bug in 'graduallyChangeSoundVolume'