Fixed Function API Groups

This fixes a bug where only the first API group was set on a function and the rest were ignored.