fixed a bug where removing classes with regex chars would fail