Previous commit fails tests -- oops. This fixes code so that tests pass