minor fix: grid-like relayout function