added fix for nested url - gh-1508