Added guard to test for the case at the end of the rod.