Fix an exception thrown when clicking the heading toolbar buttons twice

I believe this one is just a typo
Merge pull request #650 from rebelzach/fix-editor-buttons

Fix an exception thrown when clicking the heading toolbar buttons twice.