Fixed subscribe/unsubscribe bug