Only remove double spaces in `_updateClass`

Only remove double spaces in `_updateClass` and after `_trim` is called.