buf fix for canaryrecord:onload