move query param update inside history if block, and change checked radio button based on query string