fix dim clearing