Fix out of order tail issue