CHICAGO (CBS) — A new bill that just passed in Springfield is closing a loophole that allowed lawmakers to get a month’s pay for as little as a day of work.

CBS 2 exposed the loophole.

READ MORE: Car Found, Driver Arrested In Westmont More Than 3 Weeks After Gage Park Carjacking

The issue came to light because of Edward Kodatt, who briefly replaced former House Speaker Mike Madigan.

Kodatt served only three days in office, but was entitled to a whole month’s pay, although he turned down the money.

READ MORE: Chicago’s Speed Cameras Churn Out Hundreds Of Thousands Of Tickets After Rule Change

The new bill is part of the legislature’s ethics package.

Starting in January, lawmakers pay will be prorated, so they only get paid for days they work.

MORE NEWS: Weekend Guests At Six Flags Great America Say Crowds, Closed Rides, Huge Fight Involving 20 People Ruined Their Experience

Now it’s off to Governor JB Pritzker for his signature.

CBS 2 Chicago Staff