capi: minor cleanup