Fixed jpa bug