Actually, when I run the code, I see that this is the case that runs. I was using 4:3 and 3:2 instead of 3:4 and 2:3.  So now I think that the multiplication below should be a division.  (Though I don't know if that code can ever actually run)