Fixed the bug of not toggling graph while clicking on Show/Hide Graph icon.