Fix issue with channel prepending when using environment variables