Fixed some issues in base layout.