Removed bug in python code within diagram.