fix typo and minor cleanup