Revert "Revert "Fix compilation issues""
Fuck Me
This reverts commit 8d805f7a02e5e499d6b4db1b953ffed4d6192020.