Fix missing require 'uri' bug.
Fix specs.