Fix looping after seeking