Changing modelName to type

modelName does not appear to be in scope in the pushPayload function.
It appears that this is a typo for type which is the first argument to
the pushPayload function.