Fix switches not retaining state in orientation change.