Fixed a small bug related to switching between graph edit modes