Invalid tag error now handled properly