A bank ATM malfunctioned, causing $37,000 in cash to flow out and into the hands of one unsuspecting bank customer who only requested a $140 withdrawal.

South Portland police say they responded to the TD Bank branch at about 5:30 a.m. Thursday after getting a call from a woman who said a man was spending an unusual amount of time at the ATM she was waiting to use, reports The Associated Press.

Once on the scene, officers discovered a man stuffing cash into a shopping bag. A bank official described said a "code error" caused the cash to flow out of the machine.

Police will continue their investigation even though the money was returned to the bank and officials said they don't want to press charges.