Bug fix in subscribe method