Fix compilation errors in Pale Night bugfix