fix incorrect layout behavior