Modded sources from commit a09aff1667b27f654293bbf7be8e9e86a52b9ecc