Updated patch for issue 350