Fixed bug in dispersive_gate_corrcetion method