Patch from ApOsTrOpHe to fix compile errors