Feature/fix get link

We discovered there was an error getting the $url value. We have fixed this here for when $params == null but it may also be required for when $params !== null.