Fixed tabs, added debug condition to print statements.