debugging bug fix