fixed Firefox bug of restore from localStorage