bug fix and layout adjust