Fix checkbox and radio function