Improved checkbox insertion