Fix potential issue with environment