fix bug: when no tags are select, clicking on the submit button would generate error