fixed clear option bug in query validation