Fixes for setting API URLs based on environment.