Fix overflow in automatic switch audio file playing, thanks Damjan