fix bugs and add some layout changes