fix return value of idx