fix a bug while matching option long names