Simplification of logic for #2413
Correct use of checked() for #2413 so the checkbox retains its status