fix sorter directives jumping around