Bind the autocomplete event in a better way