fix maxAttempts Infinity default. Closes #18