Fixed an out-of-bounds issue with the getNextTrackPosition function.