Added code that ensures that we pass the beginning of the data buffer to