Fix sort order and puppet cycles