localStorage bug fixed