fix debugging bug