Changes to implementation of withMetaData().