Fixed a few compilation issues with previous commit