Question: I updated to the latest version of Laravel 4 using composer update. Now I'm having a problem with the error handling library it uses - Whoops. When I have an error in my code, for instance an syntax error the following happens:

1. I reload the page
2. The actual exception ('Unexpected xxxx at ...') appears for less than a second
3. Another exception replaces it: 

```
Cannot modify header information - headers already sent by (output started at /Users/planewalker/Sites/jean/welper/vendor/filp/whoops/src/Whoops/Run.php:204)

```

The code at the above line is this:

```
        // If we're allowed to, send output generated by handlers directly
        // to the output, otherwise, return it so that it may be used by
        // the caller.
        if($this->writeToOutput()) {
            echo $output;
        }

        return $output;

```

and more specifically the `echo $output;` part.

Does anyone know why this happens?

UPDATE:

I've now determined that the problem is caused by the set\_cookie function in combination with the Whoops library's exception output. It seems that the set\_cookie function is called after the Whoops library has started outputting its view.

The only solution I found was to use a different session driver that the 'cookie' one. I've switched to using 'native' and the problem does not appear anymore.

Answer: 
I'm the author of `closure_tree`. 

If you use the `append_sibling` or `prepend_sibling` methods that are added to your model class if the order column is numeric, your `position` value will be reordered from `0..siblings.count`. No need to use another gem—I had to rely on specific ordering rules to make the majority of scopes order correctly.
After playing with the gem, I realized that it doesn't directly alter the order `position`, so it requires us to use our own functionality to set that column.

Basically: to represent a list, use the `acts_as_list` gem or another option. To use an ordered list in conjunction with the nodes of a tree, use both gems. (they should be compatible but I am not sure)