fixed localStorage method (getItem, setItem)