fix bug with JPA db