Fix delayed_retry and optional callback