Fix device_layout