I think we need to use "offset" here instead of "functionOffset" as it can be null.