fix debugging code