bugs fixed: path and domain now encoded to uri