bug fix up