loop end problems in waveform object.

Could anyone tell me whats going on with this object and why it’s behaving this way? is it a bug?

I’m using a bang to send number box data which in turn selects start/end points in the waveform object, but for some reason the loop end point doesn’t always snap to the correct position, it seems to be dependent on the position of the previous selection, if the previous selection was made to its right then the loop end doesn’t snap properly. . . . Changing the scheduler settings helped momentarily but now doesn’t seem to help at all.

I could really do with a solution for this, it’s causing problems in a much bigger patch.

coda

— Pasted Max Patch, click to expand. —

Copy all of the following text. Then, in Max, select New From Clipboard.