Fixes for PSI, closes #18