fix inf copy logic