fixed patch generation