Make sorting by last state change optional