Fix api & test