Fixed error when localStorage is disabled, fixed error when notification expired in certain environments