Fix alpha encoding