Don't perform DOM manipulations on collapsed graphs and fix cookie reading