Fixed issue with addBuff where if input and buffer length were the same it failed.