Debug messages and bug fixes.

[#56443410]