Handle stale shares better

Changed how stale shares are handled to avoid exceptions.