Added distinct to fix #37