Fixing bug where "Waiting" tab did not sort correctly