Add Commbox unit test and fix bug