fix selected tags === null error