add bin command and fix bug