SOUTH PORTLAND, Maine (AP) — A malfunctioning ATM at a bank in Maine has dispensed $37,000 in cash to a man who requested $140.

South Portland police say they responded to the TD Bank branch Thursday morning 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. Officers found the man stuffing cash into a shopping bag.

The money was returned to the bank. Bank officials say they don’t want to press charges. But police continue to investigate. The man hasn’t been charged.

A bank official describes the problem as a “code error” and says no customer accounts were affected.