fix sizeof() bug
Merge pull request #385 from ruil2/encoder_update

  fix sizeof() bug