fix bug when using subscription