Merge "Fix the variable naming in encode_block"