bug fix and layout organize