Fixing bugs regarding index out of bounds and creation of possibilities
of rods.