[Fix #440] Use url.href instead of url.toString()