Added a further ORDER BY so that results from the database are consistent.