patch for correct work