fix frame logic bug caught by Sam Calisch in class

with the following test: To recreate the behavior, it's enough to go into examples/Acrobot/runPassiveURDF.m and add this line: p = p.addRobotFromURDF('Acrobot.urdf'); after the original creation of p. Then later, change randn(4,1) to randn(8,1) to create initial conditions for the two acrobot system.