fixed bugs with tag