respect default visibility setting
fixed extremely insidious bug where NaN inputs come out as p=0.001
index bug fix