fixed a bug in check cases