layout behavior issues fixed