Use correct environment to get baseURL

Fixes #2492