Make the check more robust