Fix deletion of whole input

When user removes value using backspace, the last character goes back because the timeout function (which calls ajax) is not cleared and server returns query with last letter which update the input field.