fix typo in error throwing