Fixed java.lang.ClassCastException: models.X cannot be cast to models.X