Fix bug for using check function.