Fix error where cash was not a number NaN