save to localstorage more frequently, fixes #1345