Fixed bug causing autocomplete error