more fixes for problems with URL decoding... there were some subtleties I missed before in issue #1.