Fix to my fix for Macs. The dangers of including code from online sources without testing...
Thanks to Richard Worrall.