fix #37651
addition to fix #37651: complete layout calculations