Fixes for set_min_similarity and app_focus

I was just looking through the code and discovered why app_focus and set_min_similarity aren't working. I think this fixes them both.