fixed sequence tag overflow issue and added unittest

when sequence tag reaches max value, it's not reset correctly.
3 jobs for 8-sequence-tag-overflow in 1 minute and 11 seconds (queued for 3 seconds)
latest