fix typo and bug