Add some consistency checks