Fix API incompatibility