Indirectly merged changes from Brute because I'm bad at git :)