Merge pull request #9328 from valeriosetti/psasim-improvements

psasim: some improvements to the core