Fixes search button clear and cycle on search entry

The search button was clearing the search entry when clicked. I thought I fixed it in a previous commit but was mistaken.

Also solved an event cycle when pasting on the search entry that caused an exception. This one depends on the first fix.