fix for broken user-defined apis