Fix api test