doc
fixed env logic