Another crack at fixing the checkbox logic