Minor fixes to syntax so this works under 2.6.