fix typo and clean up workaround