move tag to the correct place