fix product loop