Fixed issue where the js local storage was not cleared