Indeed, there was also a bug in the case of uniform scaling, when the scaling is not 1.
This PR will fix the problem: