utils: properly adjust array in remove actions
Merge pull request #188 from mtomaschewski/array-remove

utils: properly adjust array in remove actions