fix some apis and manager functions