A fix for return values in functions and another step towards