fixed logic in checkbox widget

There was a logical case where a <label> element could have been closed but not opened within the checkbox widget - this change fixes this.
Merge pull request #455 from shieldo/patch-1

fixed logic in checkbox widget