fix bug in parenv with optional args