fix errors resulting from case class refactoring