Fixed a bug in the check determination.