Fixes hibernate proxy issue