Fixed multiple bugs in PRM and RRG implementations