Fix a typo and some compiler warnings