refactored search activity, sql error on search