Replaced the contains with indexof() in publishPA.js