fix syndentry ordering, add test case