Fixed segment retrieval for ER, it was wrong due to a bad merge with the master branch
Merge branch 'ER' of https://github.com/lscsoft/pcat into ER