Fixed bug in commhandler