fixed bugs from renaming API