Fixed api forgot to call function