Corrected error in finding the checked checkboxes