fix sky cleanup order (requires smartpointer fix!)