fixed minor error and removed a debug output