Added some protection against inconsistent PSE data in script.js