Updated: Bugfix for previous commit. Removed debug statement from output