Hello again!

This time there seems to be a problem with scaling. I created a 3D cube and when the model matrix is scaled, it shrinks and grows back to its original dimensions! Here's how the model matrix is calculated:
[code=delphi]
if UpdateNeeded then
begin
CachedMatrix := Mat4Scale(Mat4Translate(Mat4CreateRotationEuler(FR otation),
Vec3Negate(FPosition)), FScale);

UpdateNeeded := False;
end;
Result := CachedMatrix;
[/code]
I suppose the scaling should be placed somewhere else, but where?

Oh, and here's Mat4Scale's code:
[code=delphi]
function Mat4Scale(const M: TBrainMatrix; const V: TBrainVector): TBrainMatrix; inline;
begin
Result := M;

Result.M[0, 0] := Result.M[0, 0] + V.X;
Result.M[1, 1] := Result.M[1, 1] + V.Y;
Result.M[2, 2] := Result.M[2, 2] + V.Z;
end;
[/code]

Any ideas, guys?