fixing a warning and a typo