fix some logic errors in viz