fixed hibernate issues