Fixed typo and bug