corrected _encodetemp()
corrected _encodetemp()