fix api like crash