fix a typo error and a code warning