fix return value of code