More debug stuff and maybe a fix