added check for localstorage quota exceeded inside setState. fixed #167