Fix check method

I found a bug checking my codes vaguely...