Pass the sort field a less hacky way