Bug fix in hibernate mapper