Merge HAL fixes