Move environment vars to proper place (again)
Merge branch 'master' into HEAD
Fix IndexErrors