Fixed localStorage permission failure crashing the lib.