Fixed an Error showing up in the dev console when executing a disabled command

@RaymondLim i put up this pull request as discussed in #3030
i suggest you should test this with the pull #3027 merged in because previously the font size change commands weren't disabled so another error shows up in the dev console.