"checked" logic fixed