fixed bug, more debug printing