Dynamic sorting and fixes