fix typo and remove another piece of unused code