fix search activity sql error