fixed hibernate issues.