fixed code generation for function call