Modified code for RadioButton click handling