Fix compilation issues.

Please review these changes.