Glitch-like sounds from groove~ - real time buffer recording (granular synthesis problem)

UCA's icon

Hello all!
I've been having this weird glitch like sound from my recent patch that records real-time audio to the buffer to be granulated by groove object. Noise happens at random intervals and only happens while continuously recording. I also tried with different audio drivers but same thing happens. I've been trying to solve this problem for a while now but couldn't come up with a proper reason for why this would be happening.

grainMain.maxpat
text/plain 32.58 KB

polyGrain.maxpat
text/plain 16.18 KB
for using poly~

noise example - 00:05 - 00:06

Any ideas ?
Sorry for the messy patch.
UCA.