Review/borland fixes

Contains fixes for bcc compiler.