Fix for Mountain Lion

(might break for older versions of the OS)