api compatibility fixes