several typo bug fixes