Fixed bug of incorrect checkboxes getting selected