total order check bug fix