Fixing typos and copy-paste bugs