fixes in ShrageStar algorithm