update for latest nan changes