Prevent crash on suspend/resume event(Volodymyr Mieshkov)