Fixed environment dependency in tests.
Fixed AFM-64, I think.