fixes for dat range queries in localstorage