fixed a bug with tag saving