toggling between medium persists between pages