Return url fix

Fixes #1789