fix the initial condition issue with checkboxes