fixed a discrepancy in writereplycontroller