Correctly send debug message when objects are created.