trying to fix circle tests, moving env variable checks