fix nest {} when use custom End and Close