added some debug code
fixing minor bug found by QA