Fixed a few layout bugs