Fix errors in resolving base url