Fixed interval buffer bug

vicious one ;)
More safety check