fix ordering of result