Fix some typo and bugs