Patch for #309