Fix problem on some cases with url to get depoy file. closes #2705