Fix dinner patch for python 3