Fix mac URL parsing.
Merge branch 'bugfixes' into 3.1