JK: Fixing various compile time errors.