fixed jpa setup

fixed some 'stupid' bugs
fixed bad chat-performance