Fix ability to pass frame types to Encode().