
637 N.W.2d 194 (2001)
Richard GILBERT, Appellant,
v.
USF HOLLAND, INC., and Constitution State Service Company, Appellees.
No. 00-0873.
Supreme Court of Iowa.
December 19, 2001.
*195 Jerry Jackson of Moranville & Jackson, P.C., West Des Moines, for appellant.
John E. Swanson and Aaron T. Oliver of Hansen, McClintock & Riley, Des Moines, for appellees.
TERNUS, Justice.
This appeal involves the imposition of penalty benefits on an employer and workers' compensation carrier who contested an employee's entitlement to disability benefits. The district court, on judicial review, affirmed the award of disability benefits, but reversed the award of penalty benefits. The employee's appeal was transferred to the court of appeals where the district court ruling on the penalty benefits issue was reversed and the industrial commissioner's award of such benefits was affirmed. We granted further review and now vacate the court of appeals decision and affirm the judgment of the district court.

I. Background Facts and Proceedings.

These legal proceedings began when the appellant, Richard Gilbert, filed a workers' compensation claim for an injury suffered on June 4, 1997. The following recitation of facts is based on the findings made by the industrial commissioner and the documentary evidence submitted at the arbitration hearing.
At the time of his injury, Gilbert was employed by the appellant, USF Holland, Inc., as a city delivery driver in Des Moines, delivering and picking up freight throughout the city. On June 4, 1997, Gilbert made a delivery to Sun Chemical. When he was finished, he bent over to pull up on a dock plate. A dock plate is a heavy metal ramp used to load and unload trucks. It is mechanically balanced so that, despite its approximately 2000-pound weight, it is generally easily engaged or disengaged by pulling on a cord. This time, however, the dock plate allegedly stuck, and "jerked [Gilbert] back down." Gilbert felt some pain in his back at the time, but did not think anything about it. His second attempt to disengage the dock plate was successful. Gilbert then walked over to a nearby desk to sign a weigh bill. When he stood up after signing the bill, "everything just popped loose" and he felt a great deal of pain. He immediately reported the injury to one of the company dispatchers.
The following day Gilbert completed an injury investigation form for his employer. The report asked for the "[e]mployee's handwritten account of HOW [the] injury occurred." Gilbert wrote, "Bent over desk to sign bill[;] when stood back up neck popped." The report further asked the employee why he felt the injury occurred, to which Gilbert responded, "Has no idea what happened." He also wrote that he had "no idea" how he may have contributed to the injury. Gilbert did not make any *196 reference in his report to having pulled on a stuck dock plate prior to signing the weigh bill nor that he felt something in his back at that time. Additionally, he did not mention the dock plate incident to his supervisor who was present when Gilbert completed the form.
Gilbert was initially treated by Dr. Barbara White, whose exam notes from June 5, 1997 stated: "Richard comes to us today after injury last evening when he was leaning over [to] sign some forms at work and at that time he felt a popping in his neck and since that time has had upper thoracic pain with movement and stiffness." Gilbert was also seen by a physical therapist on June 5, who reported in his notes that Gilbert "stat[ed] he was injured on the previous day while bending forward [and] upon arising [he] noted popping in his neck and had immediate onset of pain on the right paraspinal muscles of cervical spine." Gilbert also informed the therapist that he had suffered a previous injury to his neck approximately two years ago that had responded well to physical therapy. Neither the physician's notes nor the physical therapist's notes of June 5 indicate that Gilbert associated his pain with pulling on a dock plate.
Gilbert's condition responded to conservative treatment and he was returned to full duty at his regular position on June 12. At that time, one of his treating physicians, Dr. Maurice Minervini, indicated that Gilbert's cervical and thoracic sprains were resolved.
Shortly after Gilbert returned to work, he was told he was not entitled to any workers' compensation benefits because his injury was idiopathic: it "could happen to anybody at any time." At that point, Gilbert said he "clarified" with the insurance adjuster "what [he] was doing at the time about the dock plate pulling the door down and then walking over and signing the weigh bill." The workers' compensation carrier did not, however, change its determination that the injury was noncompensable.
Approximately one month later, on July 12, Gilbert felt something pop in the back of his neck as he got out of bed. He felt severe pain radiating down his right arm. Gilbert sought medical treatment again and eventually was referred to Dr. Thomas Carlstrom. In reporting the history of his condition to this physician, Gilbert said "he had pulled on a sticky dock plate" "shortly before" he felt something pop in his neck when straightening up. Dr. Carlstrom diagnosed a herniated disk and further opined that Gilbert's current symptoms "should be referred back to the June incident at work." By late August, Gilbert was able to resume his normal job duties without restrictions. Dr. Carlstrom opined that Gilbert had no permanent impairment from his injury.
The employer and its insurer, appellee, Constitution State Service Company, continued to maintain that the June 4 injury did not arise out of Gilbert's employment and, therefore, was not compensable. (Future references to the "employer" include the insurance carrier.) In an effort to prove otherwise, Gilbert provided the employer with a letter from Dr. Carlstrom wherein the doctor stated that Gilbert's "neck pain, herniated cervical disc, and cervical radiculopathy should all be related to a lifting, tugging work injury on the 4th of June, 1997." Gilbert also obtained a letter from Dr. Minervini, who stated that he never said in his progress notes that "[t]his is not a work related injury." Finally, Gilbert obtained a statement from a man who asserted that he had witnessed the June 4, 1997 incident and gave the following account: "[Gilbert] bent over to pop up a sticking dock plate then closed his trailer door. He then walked over to *197 the desk and bent over to sign his bills and when he stood back up I heard him groan and saw him grab his neck."
Despite these statements, the employer persisted in its denial of benefits. It contended that the act of bending over and straightening up caused Gilbert's injury and that an injury occurring as a result of this everyday activity did not arise out of Gilbert's employment. The employer disputed Gilbert's assertion that the injury occurred when he pulled on the stuck dock plate, noting that this version of the events of June 4 did not surface until after compensation benefits had been denied. The employer found the recent reports from the treating physicians unconvincing because these opinions were based on Gilbert's current rendition of the facts of his injury, rather than the explanation he originally gave for how the injury occurred.
As noted previously, Gilbert filed a workers' compensation action. He sought disability benefits and penalty benefits for the employer's refusal to timely pay weekly benefits. The matter proceeded to hearing. The deputy industrial commissioner noted in his decision that the employer had placed the employee's credibility at issue. The deputy then made a finding that the employee was credible and rejected the employer's reliance on Gilbert's initial explanation of his neck injury. Accordingly, the deputy found that Gilbert had sustained an injury arising out of his employment. The deputy awarded healing period benefits and permanent partial disability benefits based on a finding of a twenty percent impairment.
In considering the employee's claim for penalty benefits, the deputy concluded that the employer did not have a reasonable basis for denying the employee's claim on the ground that it was not work-related. Consequently, Gilbert was awarded a penalty of one-half of the healing period benefits. The deputy denied penalty benefits, however, as to the employer's refusal to pay permanent partial disability benefits. He noted Dr. Carlstrom's view that Gilbert had sustained no permanent impairment coupled with Gilbert's release to return to work without restrictions made the issue of permanent disability fairly debatable.
On the employer's appeal to the industrial commissioner, the commissioner affirmed an award of disability benefits, but reduced the amount to five percent. As for the penalty benefits, the commissioner stated:
Defendants' assertion that the medical diagnosis of cervical strain/sprain as well as the later diagnosed herniated disc condition was due to the bending over incident and not earlier activity was a conclusion that had no support in the record following Dr. Carlstrom's and Dr. Minervini's reports.
The commissioner also agreed with the deputy that the "continued denial of the claim after such matters were addressed by Drs. Carlstrom and Minervini was not fairly debatable and was not reasonable." Therefore, the commissioner affirmed the deputy's award of penalty benefits relating to nonpayment of healing period benefits.
Gilbert sought judicial review in the district court, as did the employer. The district court affirmed the five-percent permanent partial disability award, but reversed the industrial commissioner's award of penalty benefits. The court stated in part:
Here [Gilbert] provided a history about how the June 4, 1997, incident occurred. He provided it not once, but three separate times. Then [Gilbert's] workers' compensation claim was denied. After that he changed his history. It defies logic to suggest that this "abrupt change in facts" should now preclude *198 the [employer] from disputing the work relatedness of the claim.
The court also noted that "[m]erely because an injured worker changes the history of the incident and [gives] only the changed history ... to subsequent care providers does not mean the initial history by the injured worker must be totally disregarded."
Gilbert appealed the district court's decision on penalty benefits, and his appeal was transferred to the court of appeals. That court reversed the district court and affirmed the industrial commissioner's penalty-benefits award. We granted further review.

II. Scope of Review.

Our review is governed by Iowa Code chapter 17A (1997), Iowa's Administrative Procedure Act.[1]See Herrera v. IBP, Inc., 633 N.W.2d 284, 286-87 (Iowa 2001). "An appeal of a district court's ruling on judicial review of an agency decision 'is limited to determining whether the district court correctly applied the law in exercising its section 17A.19(8) judicial review function.'" Id. at 287 (quoting Ahrendsen ex rel. Ahrendsen v. Iowa Dep't of Human Servs., 613 N.W.2d 674, 676 (Iowa 2000)). Section 17A.19(8) permits a reviewing court to reverse an agency decision when it is "[i]n violation of constitutional or statutory provisions," "[a]ffected by other error of law," or "unsupported by substantial evidence in the record made before the agency when that record is viewed as a whole." Iowa Code § 17A.19(8)(a), (e), (f).
Our review is for correction of errors of law, not de novo. See Dunlavey v. Economy Fire & Cas. Co., 526 N.W.2d 845, 849 (Iowa 1995). Thus, we "are not free to interfere with [an] agency finding where there is a conflict in the evidence or when reasonable minds might disagree about the inference to be drawn from the evidence, whether disputed or not." Stephenson v. Furnas Elec. Co., 522 N.W.2d 828, 831 (Iowa 1994). On the other hand, we are not bound by findings that lack substantial evidence or "as to which there is no room for difference of opinion among reasonable minds." Id.

III. Penalty Benefits.

The only issue on appeal is whether the agency correctly determined that Gilbert was entitled to penalty benefits relating to the employer's nonpayment of healing period benefits. Iowa's workers' compensation act sets forth the circumstances under which penalty benefits are to be awarded:
If a delay in commencement or termination of benefits occurs without reasonable or probable cause or excuse, the industrial commissioner shall award benefits in addition to those benefits payable under this chapter ... up to fifty percent of the amount of benefits that were unreasonably delayed or denied.
Iowa Code § 86.13. "[S]ection 86.13 `recognizes... an affirmative obligation on the part of the employer and insurance carrier to act reasonably in regard to benefit payments in the absence of specific direction by the commissioner.'" Christensen v. Snap-On Tools Corp., 554 N.W.2d 254, 260 (Iowa 1996) (alteration in original) (quoting Boylan v. Am. Motorists Ins. Co., 489 N.W.2d 742, 743 (Iowa 1992)).
*199 This court has noted that section 86.13 codifies, in the workers' compensation context, the common law rule that an insurer with a good faith dispute over the legal or factual validity of a claim can challenge the claim, if its basis for doing so presents a fairly debatable issue. See Covia v. Robinson, 507 N.W.2d 411, 412 (Iowa 1993). Thus, when an employee's claim for benefits is fairly debatable based on a good faith dispute over the employee's factual or legal entitlement to benefits, an award of penalty benefits is not appropriate under the statute.[2]
At this juncture, it is appropriate to note the basis for USF Holland's denial of Gilbert's workers' compensation claim. Gilbert's claim was rejected because the employer determined that Gilbert's injury did not arise out of his employment. The commissioner held that this issue was not fairly debatable. Whether the issue was fairly debatable turns on whether there was a disputed factual issue that, if resolved in favor of the employer, would have supported the employer's denial of compensability. The employer argued that there was a factual dispute as to how the injury occurred. The commissioner held, however, that once the physicians rendered their opinion that the injury was caused by Gilbert's pulling on the stuck dock plate, there was no factual basis for a continued belief that the injury did not arise out of Gilbert's employment.
Before we address whether there was a material factual dispute as to compensability, it is helpful to consider the legal context in which this dispute arose.
It is well settled in Iowa that for an injury to be compensable, it must occur both in the course of and arise out of employment. The words "in the course of" refer to the time, place, and circumstances of the injury. The term "arising out of" refers to the cause and origin of the injury. The two tests are separate and distinct and both must be satisfied in order for an injury to be deemed compensable.
Miedema v. Dial Corp., 551 N.W.2d 309, 310-11 (Iowa 1996) (citations omitted). In this case it was undisputed that Gilbert's injury occurred "in the course of" his employment. He was on the job, picking up freight at a customer site when the injury happened. The dispute here centers on whether the injury arose out of the employment.
We have stated that for an injury to arise out of the employment, "[t]he injury must not have coincidentally occurred while at work, but must in some way be caused by or related to the working environment or the conditions of ... employment." Id. at 311. In other words, the injury "must be a rational consequence of a hazard connected with the employment." Cedar Rapids Cmty. Sch. v. Cady, 278 N.W.2d 298, 299 (Iowa 1979); see also Koehler Elec. v. Wills, 608 N.W.2d 1, 4 (Iowa 2000) ("Generally injuries resulting from risks personal to the claimant are not compensable."). With these principles in mind, we now examine the factual basis for the employer's position that Gilbert's injury did not arise out of his employment.
USF Holland relied on Gilbert's initial explanation for his injury in determining that his injury was not compensable. The employer maintained that an injury resulting from the employee's act of straightening up after bending over was not caused by a "hazard connected with the employment." Although the commissioner *200 believed that this position was reasonable based on the initial information available to the employer, the commissioner concluded that the employer's denial became unreasonable after Dr. Carlstrom and Dr. Minervini gave their opinions that Gilbert's injury was causally connected to Gilbert's employment.
We agree with the district court that there is not substantial evidence in the record to support the commissioner's decision. Although the physicians concluded that Gilbert's injury was caused by his employment, these opinions were based on Gilbert's revised history of his injury. The employer has never asserted that the act of tugging and lifting on a stuck dock plate could not have caused the injuries suffered by Gilbert. What the employer disputed is whether the employee's revised or amplified version of the events of June 4  that he first felt pain when he pulled on a stuck dock plate  was true. Thus, the industrial commissioner should have focused on whether there was a fair debate over how the injury occurred. We think there indisputably was.
In this case, the employee originally reported on three separate occasions that the injury occurred as he straightened up after signing some work documents. The occurrence of an injury in this manner would arguably be coincidental to work and would not necessarily be related to the conditions of employment. See Miedema, 551 N.W.2d at 312 (affirming denial of workers' compensation benefits to an employee who injured his back when flushing a toilet at work). We think the district court was correct when it observed that the employer was entitled to rely on Gilbert's original version of his injury even though he subsequently changed his story of how the injury occurred.
Gilbert maintains, however, that he never changed his story; he merely gave a more complete rendition of the facts after he learned that it was important for him to do so. Regardless of how Gilbert's reporting of his injury is characterized, it cannot be disputed that he never mentioned that he first felt pain after pulling on the dock plate, as opposed to when he straightened up, until after his claim had been denied. The employer was certainly entitled to argue that this previously undisclosed fact was a fabrication. Given the fact that not even the eyewitness corroborated this aspect of Gilbert's history, that pulling on the dock plate triggered the onset of pain, resolution of the matter rested on Gilbert's credibility, which the employer was free to challenge. As the deputy noted, there was a credibility issue in this case for the commissioner to resolve. The fact that the commissioner resolved the credibility issue in favor of the employee did not mean that there was not a reasonable dispute with respect to how the accident occurred.
Gilbert also argues that the employer had no reasonable basis to debate the causal connection between Gilbert's injury and his employment because the employer had no medical evidence controverting the testimony of Drs. Carlstrom and Minervini. We do not think the absence of medical testimony on behalf of the employer is important with respect to Gilbert's entitlement to penalty benefits. As we have pointed out, the debatable issue in this case was factually how the injury occurred. Medical testimony on causation is simply not relevant to resolution of this contested factual issue. In other words, the fact that the physicians relied on the revised history rather than the original history did not resolve the factual dispute as to how the injury occurred. Thus, the commissioner's reliance on the medical testimony as support for her finding that there was not a reasonable basis to contest compensability was erroneous.
*201 Finally, Gilbert criticizes the employer for failing to interview the man who witnessed Gilbert's injury. Gilbert argues the employer's inadequate investigation supports the commissioner's finding that the employer did not have a reasonable basis to deny compensability. Even if we assume there was some deficiency in the employer's investigation, a question we do not address, Gilbert fails to point out what information would have been gained from an interview of the witness that was not already available to the employer in the witness's statement provided by Gilbert. Consequently, the employer's failure to interview the witness does not support the commissioner's finding that the employer's failure to pay benefits lacked a reasonable basis.
In conclusion, we hold as a matter of law there was a reasonable factual dispute as to the manner in which Gilbert's injury occurred. Therefore, there is not substantial evidence in the record to support a finding that the compensability of his injury was not fairly debatable. We vacate the court of appeals contrary decision and affirm the district court's judgment reversing the commissioner's award of penalty benefits.
DECISION OF COURT OF APPEALS VACATED; DISTRICT COURT JUDGMENT AFFIRMED.
All justices concur except STREIT, J., who takes no part.
NOTES
[1]  Iowa's Administrative Procedure Act was extensively amended in 1998. See 1998 Iowa Acts ch. 1202. The 1998 act provides that the amendments are to take effect on July 1, 1999 and apply to agency proceedings commenced on or after that date. See id. § 46. Since the agency proceedings at issue here were commenced in 1998, the amendments do not apply.
[2]  An award of penalty benefits is also inappropriate where a reasonable delay in payment is necessary to allow the insurer to investigate the claim. See Kiesecker v. Webster City Custom Meats, Inc., 528 N.W.2d 109, 111 (Iowa 1995).
