fixed bug, added debug text