[IMP]:Improve record tag closing