Added support for autocomplete with spaces