fix bug which chopped off last tag