psm fixes; ecc js fixes