Fix a few general errors