Fixed argument index in generatemetadata