In DatabaseManager thread unsafe Session access fixed.