Quick fix to prevent undefined status code being set on response
Merge pull request #310 from stenington/299-loop

Quick fix to prevent undefined status code being set on response