fix of bug in get_layout