Added allowClear option