Removed undefined values from debug output.
More detailed comment and debug log.