bugfix on localStorage wrapper function
bugfix