Fixing clear to only fire if it is a key in query string