Solved
Try this. Add the return in the program, and I think another programming double-bar on the left.
then retype the min statement, select min from the functions as it seems to get confused on which min you want (since it means different things, e.g. a unit)

