Clicks while looping with sfplay

Oren Boneh's icon

Hi all, I tried searching but couldn't find this topic. I am trying to use the looping patch of the sfplay~ helpfile, but can't figure out how to get rid of the clicks. Does anyone have an idea?

sfplay-loops.maxpat
Max Patch