Missed an endif
Forgot to change API entry method...