Typo and bug fixes