fix environment handling in node