Document and entity variable visibility changed to protected