fix for broken test and adding debug output
more debug logging