fixing issue where teardown failed when not using default environment
fixing change in arg passing into cleanup