restore optimization, use inSubscribe global flag to fix