typeahead: Fix a javascript error.
typeahead: Allow zero as number of items.