#523 Fixes for autocomplete