fix layout bugs