fix seq%3==0 corner case