Fixed location.port to create proper base uri