Fixed call to wrong function