Fix JS compatibility for PS 1.4