some layout bugs fixed