Change logic on detecting empty tag list