Fixed a small bug. Removed debug prints.