fix grid search issue with spaces