Bugfix and autocomplete endpoint