fixed FPC compilation issues