Fix calling wrong function