fix errors following case classes