Fixes issue #1418

Adds a range check for filling up IED'S.