Fixed resource deleting in Documents