bug fix for layout