fix bug with two question marks in URL