Fixed wrong function