Fixed a bug as reported by Fraser

fixed a bug as reported by Fraser in commit #c14b7fb where a request
error occurs after a certain point