The bump in violent crime that led to the city being described as the most dangerous in the Commonwealth for two years was caused largely by a computer bug.

iBerkshires.com reports a coding error discovered last month in the software used in crime reporting designated all assaults as felonies. Fixing it has dropped the number of aggravated assault cases so far this year by at least a third.

It's not that the incidents didn't happen, officials say, but rather the severity of the classification.

The Federal Bureau of Investigation collects crime statistics each year from more than 18,000 participating communities, universities and tribal nations and releases the report annually the following fall.

The years 2016 and 2017 found North Adams, the state's smallest city, at the top of the ranking for the most number of violent crimes per capita in Massachusetts.

Police Director Michael Cozzaglio said on Friday that the department had done a "deep dive" into the cases and reporting because officers weren't seeing that level of felonies.

He found that the common offense listed as "Domestic Assault and Battery on a Family Member" without aggravating factors, was being tagged with IBR Code 13A making it a felony and not Code 13Bwhich is a  misdemeanor.

By making correcting the code it reduced the reported number of 111 to 76, which brings the total closer to about 31 percent which means the city not a dangerous city by any means.

More From WNAW AM