fixed bug and typo