Back to original method for encoding.