Fixed bugs with table search