bug fix for python debugging