fix #20115, fix resizing of brackets