Fixed a bug where wrong function name was referred

to. Functions now use correct names.