make remove_stand non-static and fix capi.c