fix tag endiing