Fix output to wrong function