SZdist cache fix

some edge cases were missing the cache