Enhanced to send SET_ENVs.