fix moveIndex bug