Handle clear div in filter to fix toLowerCase bug