Fix bug: need to check for isNaN() on the httpCode.