Adding debugging code to try to fix the problem with composition.