fixing annoying bug with checked checkboxes