fix env vars checks