Fixed layout bugs