corrected error where window.localStorage was transposed in pull request