Fix some layout bugs