fixed issue with date when restoring from localStorage (quick fixes, should be done in a better way)