Correctly clears table after search

Correctly clears table after search