fix consistency check