fix a bug in the layout