Fix looping when loading stream.