Null pointer exception in subscription closed fixed