fixing env argument parsing