fix for encompassing on graphs other than stack