Compilation/HAL fixes.