decodeScaled() fix