Ugly tricks for MacOSX