Fixed bug in function template

object type (stat or config) was a static string (config), resulting in
incorrect autogenerated functions.