fixed a issue when no autocomplete is used