Fixed summary stats divide by zero and added uniquify