More fixes to parameter passing code