fix serialisation bug I put in for S3 records