remove ending tag