Fixing api.c (part 1)

need compiler to continue.