Fixed some layout bugs