fix downward looping bug