Fix issue #35 extra comma in dynamic ref parameters