fixed a bug with the layout