Fixed case class detection