Fixing ref bug for large reference change events

Was generating invalid REF field