More bug fix for lay outing