Add debug code for null data bug
Possible fix for BadTokenException