Add window. before localStorage