fixing persistence problems and fixing entity classes