Fixed a bug as reported by Fraser

- Fixed a bug as report by Fraser in an earlier commit (c14b7fb) where a
request error is thrown after a certain number of steps.