Fix scale matrix helper