Add better retry awareness

Fixes issue #89