fix bug removing spaces