fix input segfault
fix switch button to unchecked