Fix playNext() for out of range handling