fixed for MacOS with Delphi XE2