Fixing an issue where the wrong check was being returned