make 'safe' adding and removing of pulse classes even safer