Fixed refresh bug with typeahead