Fixed the getSelectedRadio() function