Fix a number of small mistakes