Apply patch for bug #319