Added some diagnostics.