Small improvements to the JPA store.