fixed so no divide by zero in k2p distance