Fix issue with isLocalUrl method