fixed EPA bug where insertion order was wrong