fix bug; modify check consistency