fix nasty bug in the duplex module