Fixes to the Triangle script.