Improve timeout calculation based on /spec
Fix backoff attempt calculation