Hopefully fixing #305 (JPA throws Exceptions)