Fix clearing of localStorage