Fixing transform3d when scaleX and scaleY are not valid