Fixed the bugs in HPS and SPS models