Adding debug checks.