Corrected result elements and fixed debug message