Fixed closure problems. Added runDistinct