Fix an error in check_conditions() method