Why is my app hanging up when searching?