Fix canceling replacement