Fixed a duplication bug with the grinder