Fixing tab autocomplete bug