fixing bugs related to hibernate storage