Fixing the sorting be sent time for the failed messages