fixed template parameter and return type generation errors for int function params