wholesale bug fix