fixed gentags script