Fixed error when resetting search