updated patch for #34