Fixed DocumentController bug