Fixing typos and malfunctions