fixed report write bug