Fixing bug with querystrings and opening multiple connections