STABLE. Solved some bugs in graph plotting.