fix bug and typo