Fix queue sorting order fixes #1120