Add a little more buffer checking.