Fixed some layout bugs before ms5 release.