Fix pipe limit problem. Need some advice on this