fix crasher when using descending sort and deleting a msg