Fixing env check