Fix some layout and bugs