fixed debug env variable processing