Fixed infinite loop with radio group