Fixed text looping bug