fixed edit tag calculations