fixes for table sort and filter, still work in progress