fix the grinder script