fix rest sequence