fix duplex bug