Ensure set_env value is always applied
Merge pull request #1 from mremond/Ensure_set_env_applied

Ensure set_env value is always applied

By loading application before calling set_env we ensure set_env will always work.