Remove extra function param

Typescript can't compile generated context, it won't allow us to call a function of 3 arguments with only 2 parameters

Not sure what the extra 'undefined' parameter is for anyway