fix the layout bug, fixes Issue #8