update layout and fix some issues