fix #21127, fix #21123, fix layout of square bracket