Fixing env setting and tests for config