fixed #38
  Buffer encoding error in 0.8.x