Fixes bugs from renaming