Fix api incompatibility