fix return values to python