Fixed bug where only the first API group was set on functions.