Fix bugs ,set layout