Bug fix in the debug checks