Fixed bugs from renaming