fixes for api chaining