Fixes issue #1418
Adds a range check for filling up IED'S.
Merge pull request #1483 from Ergovisavi/ied_fix

Fixes issue #1418