Fix two erroneous conditional checks