bug fix main