Fix a compilation warning and a typo