Added some debugging code to try to get this sorted out