fixed modifyerrorreport to prevent the report-duplication problem