fixed localStorage operations