Fix error in cookies() and uri()

Tests run: 261, Failures: 2, Errors: 0, Skipped: 0