which coolant you use/used?
because if water pump is rusted,it wont push enough water on idle,and when rpm of car is increased,the pump pushes more water and brings down the temperature which at idle speed it cant.
check radiator car.replace broken cap of reservoir bottle.
its also possible that air is trapped inside.get the cooling system bleed-ed.