fix localstorage flag