make multi-env actually work
handle null input better