fix 24-bit support