fixed bug in subscribe