bugfix for localstorage support