fix error when subscription is none add try catch