fix clearing of .inverted when changing style