fix some apis used in .cc file