Removed unnecessary code from CommandCheck