Fixed typo that caused spaces not to be removed