fix code sequence