todo
Have a go at fixing term ordering bug