Fix Diagram refresh code - it works