Added some debug code to figure out WTF is going on