Fixed layout issues

Fixed #11 
This will probably break if the checkbox is directly checked due to bubbling. (This can be fixed by looking at the original target of the click event, or by disabling bubbling for the checkbox.)