Fixed issue for Delphi > 2007