fixed bug in find_scalar in dist.pyx