Fixes to removing gates from qubits