re#14 fixed a bug when swapping css classes