Fix DOM class remove function.