Fixed bug in tag editing