fix bug in subscribe counting