fixed some FPC compilation issues
- regression tests program compiles, but still fails to run